package com.le.tester.javaThink.fifth.chapter14_StreamingProgramming;

import java.util.stream.Stream;

/**
 * 描述：使用mapTo进行数值的代替
 */
public class FunctionMap3 {
    public static void main(String[] args) {
        Stream.of("5", "7", "9").mapToInt(Integer::parseInt).forEach(o -> System.out.format("%d ", o));
        System.out.println();

        Stream.of("17","19","23").mapToLong(Long::parseLong).forEach(o -> System.out.format("%d ", o));
        System.out.println();

        Stream.of("17","1.9",".23").mapToDouble(Double::parseDouble).forEach(o -> System.out.format("%f ", o));
    }
}
